<?php
// No directAcces
defined( '_AppBackMiage' ) or die( 'Restricted access' );
if(isAdministrateur()){
    include_once (DS."backoffice/include/header.php");

    if(isset($_GET['uid']) && !empty($_GET['uid']))
    {
        $contact = new ContactEntreprise($_GET['uid']);
    }
    else
    {
        // redirection
        redirectTo(URLBACK);
    }
    ?>
    <?php

    include_once( DS."backoffice/include/toppanel_utilisateurs.php");

    ?>
    <div id="wrapper">
        <div id="content">
            <div id="box">
                <h3 id="adduser"><?php echo $contact->getNomUtilisateur()." ".$contact->getPrenomUtilisateur(); ?></h3>
                <form id="form" method="post">
                    <fieldset id="personal">
                        <legend>Informations Personnelles</legend>
                        <label>Email :</label>
                        <label class="input"><?php echo $contact->getEmailUtilisateur(); ?></label>
                        <br />
                    </fieldset>
                    <fieldset id="address">
                        <legend>Adresse</legend>
                        <label>Adresse :</label>
                        <label class="input"><?php echo $contact->getAdresse1(); ?></label>
                        <br />
                        <label>Adresse + :</label>
                        <label class="input"><?php echo $contact->getAdresse2(); ?></label>
                        <br />
                        <label>Ville :</label>
                        <label class="input"><?php echo $contact->getVille(); ?></label>
                        <br />
                        <label>Code Postal :</label>
                        <label class="input"><?php echo $contact->getCP(); ?></label>
                        <br />
                    </fieldset>
                    <fieldset id="opt">
                        <legend>OPTIONS</legend>
                        <label>Entreprise :</label>
                        <label class="input"><?php $entreprise = new Entreprise($contact->getIdEntreprise()); echo stripslashes($entreprise->getNomEntreprise()); ?></label>
                        <br />
                        <label>Droits Acc&eacute;es :</label>
                        <label class="input"><?php echo $contact->getTypeById($contact->getIdUtilisateur()); ?></label>
                    </fieldset>
                </form>
            </div>
        </div>
    <?php
    include_once (DS."backoffice/include/sidebar.php");
    include_once (DS."backoffice/include/footer.php");
}
else
{
    redirectTo(URLBACK);
}
?>
